<?php
class OnlineController extends AppController{
        var $name = 'Online';
        
        var $uses = array('Whoonline','Analytic');
        var $components = array('Browser');
        
		function beforeRender(){
			parent::beforeRender();
			$this->set('menu_parent', 'Tools');			
			$this->set('menu_subactive', 'Users_Online');		
		}       

		function admin_index(){
			$limit_time = time() - 300;
			$condition = array (
				"and" => array (
					"activity >=" => $limit_time
					));			
			if($Online=$this->Whoonline->find('all',array('conditions' => $condition)));
			{
				$this->set("users",$Online);
			}
			
			
		}
				
		
}